﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Vehicle_Maintenance
{
    public partial class User : Form
    {
        public User()
        {
            InitializeComponent();
        }

        private void b_OK_Click(object sender, EventArgs e)
        {
            if (tb_FName.Text == "")
            {
                MessageBox.Show("First Name is required", "Required Field", MessageBoxButtons.OK);
            }
            else if (tb_LName.Text == "")
            {
                MessageBox.Show("Last Name is required", "Required Field", MessageBoxButtons.OK);
            }
            else if (tb_LicNum.Text == "")
            {
                MessageBox.Show("Licence Number is required", "Required Field", MessageBoxButtons.OK);
            }
            else if (cb_State.SelectedIndex == -1)
            {
                MessageBox.Show("Please select a state is required", "Required Field", MessageBoxButtons.OK);
            }
            else
            {
                DialogResult = System.Windows.Forms.DialogResult.OK;
            }
        }
    }
}
